Skip to content

[libc++] Move more tests into better places #148419

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

philnik777
Copy link
Contributor

No description provided.

Copy link

⚠️ C/C++ code formatter, clang-format found issues in your code. ⚠️

You can test this locally with the following command:
git-clang-format --diff HEAD~1 HEAD --extensions cpp -- libcxx/test/extensions/libcxx/locale.convenience/conversions/conversions.string/ctor_move.pass.cpp libcxx/test/std/numerics/c.math/fdelayed-template-parsing.pass.cpp libcxx/test/std/numerics/rand/rand.req/rand.req.urng/valid_int_type.verify.cpp libcxx/test/std/numerics/rand/rand.req/rand.req.urng/valid_real_type.verify.cpp libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/shared_ptr_array.pass.cpp
View the diff from clang-format here.
diff --git a/libcxx/test/extensions/libcxx/locale.convenience/conversions/conversions.string/ctor_move.pass.cpp b/libcxx/test/extensions/libcxx/locale.convenience/conversions/conversions.string/ctor_move.pass.cpp
index a536e6e9b..3e9eb939f 100644
--- a/libcxx/test/extensions/libcxx/locale.convenience/conversions/conversions.string/ctor_move.pass.cpp
+++ b/libcxx/test/extensions/libcxx/locale.convenience/conversions/conversions.string/ctor_move.pass.cpp
@@ -24,19 +24,18 @@
 
 #include "test_macros.h"
 
-int main(int, char**)
-{
-    typedef std::codecvt_utf8<wchar_t> Codecvt;
-    typedef std::wstring_convert<Codecvt> Myconv;
-    // create a converter and perform some conversions to generate some
-    // interesting state.
-    Myconv myconv;
-    myconv.from_bytes("\xEF\xBF\xBD");
-    const auto old_converted = myconv.converted();
-    assert(myconv.converted() == 3);
-    // move construct a new converter and make sure the state is the same.
-    Myconv myconv2(std::move(myconv));
-    assert(myconv2.converted() == old_converted);
+int main(int, char**) {
+  typedef std::codecvt_utf8<wchar_t> Codecvt;
+  typedef std::wstring_convert<Codecvt> Myconv;
+  // create a converter and perform some conversions to generate some
+  // interesting state.
+  Myconv myconv;
+  myconv.from_bytes("\xEF\xBF\xBD");
+  const auto old_converted = myconv.converted();
+  assert(myconv.converted() == 3);
+  // move construct a new converter and make sure the state is the same.
+  Myconv myconv2(std::move(myconv));
+  assert(myconv2.converted() == old_converted);
 
   return 0;
 }
diff --git a/libcxx/test/std/numerics/rand/rand.req/rand.req.urng/valid_int_type.verify.cpp b/libcxx/test/std/numerics/rand/rand.req/rand.req.urng/valid_int_type.verify.cpp
index eada7422b..e81814d9a 100644
--- a/libcxx/test/std/numerics/rand/rand.req/rand.req.urng/valid_int_type.verify.cpp
+++ b/libcxx/test/std/numerics/rand/rand.req/rand.req.urng/valid_int_type.verify.cpp
@@ -10,8 +10,7 @@
 
 #include <random>
 
-void test()
-{
+void test() {
   {
     std::binomial_distribution<bool> baddist; //expected-error@*:* {{IntType must be a supported integer type}}
     std::binomial_distribution<int> okdist;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant